//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package org_eval_dao

import "go.mongodb.org/mongo-driver/mongo"

var TargetDao *_TargetDao
var EvaluateDao *_EvaluateDao
var ResultScoreDao *_ResultScoreDao
var VoteScoreDao *_VoteScoreDao

func InitDao(mgoDb *mongo.Database) (err error) {
	TargetDao, err = newTargetDao(mgoDb)
	if err != nil {
		return
	}
	EvaluateDao, err = newEvaluateDao(mgoDb)
	if err != nil {
		return
	}
	ResultScoreDao, err = newResultScoreDao(mgoDb)
	if err != nil {
		return
	}
	VoteScoreDao, err = newVoteScoreDao(mgoDb)
	if err != nil {
		return
	}
	return
}
